package com.sinven.entity;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * NideshopTopic entity. @author MyEclipse Persistence Tools
 */
/**
 * 李志伟
 * 反向生成
 */
@Entity
@Table(name = "nideshop_topic", catalog = "csf")
public class Topic implements java.io.Serializable {

    // Fields

    private TopicId id;

    // Constructors

    /** default constructor */
    public Topic() {
    }

    /** full constructor */
    public Topic(TopicId id) {
        this.id = id;
    }

    // Property accessors
    @EmbeddedId
    @AttributeOverrides({
            @AttributeOverride(name = "id", column = @Column(name = "id", nullable = false)),
            @AttributeOverride(name = "title", column = @Column(name = "title", nullable = false)),
            @AttributeOverride(name = "content", column = @Column(name = "content", length = 65535)),
            @AttributeOverride(name = "avatar", column = @Column(name = "avatar", nullable = false)),
            @AttributeOverride(name = "subtitle", column = @Column(name = "subtitle", nullable = false)),
            @AttributeOverride(name = "topicCategoryId", column = @Column(name = "topic_category_id", nullable = false)),
            @AttributeOverride(name = "readCount", column = @Column(name = "read_count", nullable = false)),
            @AttributeOverride(name = "scenePicUrl", column = @Column(name = "scene_pic_url", nullable = false)) })
    public TopicId getId() {
        return this.id;
    }

    public void setId(TopicId id) {
        this.id = id;
    }

}